<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        table {
            width: 100%;
            border-collapse: collapse;
        }
        th, td {
            border: 1px solid black;
            padding: 8px;
            text-align: left;
        }
        th {
            background-color: #f2f2f2;
        }
    </style>
</head>
<body>
<table>
    <caption>Devops User List</caption>
    <button><a href="/" style="float:right;">返回</a></button>
    <button style="margin-left:10px;"><a href="/devops/add" style="float:right;">新增</a></button>
    <thead>
    <tr>
        <th>ID</th>
        <th>Username</th>
        <th>Project Name</th>
        <th>User Role</th>
        <th>Create Time</th>
        <th>Operation</th>
    </tr>
    </thead>
    <tbody>
    {{ range .data }}
    <tr>
        <td>{{ .DevopsUserId }}</td>
        <td>{{ .DevopsUserName }}</td>
        <td>{{ .DevopsProjectName }}</td>
        <td>{{ .DevopsUserRole }}</td> <!-- 如果角色为空，则显示N/A -->
        <td>{{ .CreateTime }}</td>
        <td>
            <button><a href="/devops/edit/{{ .DevopsUserId }}">edit</a></button>
            <button><a href="/devops/delete/{{ .DevopsUserId }}">delete</a></button></td>
    </tr>
    {{ end }}
    </tbody>
</table>
</body>
</html>